package com.wwg;

import java.util.ArrayList;
import java.util.List;

/**
 * 总建造者
 */
public class Director  {

    private List<String> sequence = new ArrayList<String>();
    private BenChiBuilder benChiBuilder = new BenChiBuilder();//奔驰工厂
    private BaoMaBuilder baoMaBuilder = new BaoMaBuilder();

    //A类型的奔驰车
    public BenChiModel getATypeBenChiModel(){
        this.sequence.clear();
        this.sequence.add("start");
        this.sequence.add("stop");
        this.benChiBuilder.setSequence(sequence);
        return (BenChiModel) benChiBuilder.getCarModel();

    }

    //B类型的奔驰车
    public BenChiModel getBTypeBenChiModel(){
        this.sequence.clear();
        this.sequence.add("alarm");
        this.sequence.add("start");
        this.sequence.add("stop");
        this.benChiBuilder.setSequence(sequence);
        return (BenChiModel) benChiBuilder.getCarModel();

    }
}
